function order_checkdata()
{
	var name = document.getElementById("name").value;
	if(!name)
	{
		alert("请填写称呼！");
		document.getElementById("name").focus();
		return false;
	}
	
	var telphone = document.getElementById("telphone").value;
	var pattern =/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/; ;
	if (telphone && telphone.search(pattern) == -1)
	{
		alert("电话号码格式不正确！");
		document.getElementById("telphone").value = "";
		document.getElementById("telphone").focus();
		return false;
	}
		
	var cellphone = document.getElementById("cellphone").value;
	var regu =/(^[1][3|5|8][0-9]{9}$)|(^0[1][3][0-9]{9}$)/;
	if (cellphone && !regu.test(cellphone))
	{
		alert("手机号码格式不正确！");
		document.getElementById("cellphone").value = "";
		document.getElementById("cellphone").focus();
		return false;
	}
	
	var email = document.getElementById("email").value;
	var str_reg=/^\w+((-\w+)|(\.\w+))*\@{1}\w+\.{1}\w{2,4}(\.{0,1}\w{2}){0,1}/ig;
	if (email && str_reg.test(email)==false)
	{
		alert("邮箱格式不正确！");
		document.getElementById("email").value = "";
		document.getElementById("email").focus();
		return false;
	}
	
	var content = document.getElementById("content").value;
	if(!content){
		alert("请填写所订产品描述！");
		document.getElementById("content").focus();
		return false;
	}
	
	return true;
}

function leave_check(){
	var atc_mobphone = document.getElementById("atc_mobphone").value;
	var pattern =/^[+]{0,1}(\d){1,3}[ ]?([-]?((\d)|[ ]){1,12})+$/; ;
	if (atc_mobphone && atc_mobphone.search(pattern) == -1)
	{
		alert("电话号码格式不正确！");
		document.getElementById("atc_mobphone").value = "";
		document.getElementById("atc_mobphone").focus();
		return false;
	}
	
	var atc_truename = document.getElementById("atc_truename").value;
	if(!atc_truename){
		alert("请填写您的称呼！");
		document.getElementById("atc_truename").focus();
		return false;
	}
	
	var atc_content = document.getElementById("atc_content").value;
	if(!atc_content){
		alert("请填写留言内容！");
		document.getElementById("atc_content").focus();
		return false;
	}
	
	return true;
}
